/*
编写 : Hexh
时间 : 2012-7-2 17:51:39
*/
using System.Collections.Generic;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Entities;
using HMIS.Infrastructure.Core.Repositories;

namespace HMIS.Infrastructure.Facade.Impl
{
	/// <summary>
	///	 the impl of IInfraIdcardFacade
	/// </summary>
	public class InfraIdcardFacadeImpl : IInfraIdcardFacade
	{

		private readonly IInfraIdcardRepository InfraIdcardRepository;

		public InfraIdcardFacadeImpl(IInfraIdcardRepository InfraIdcardRepository)
        {
			this.InfraIdcardRepository = InfraIdcardRepository;
        }

        #region IInfraIdcard Entity Save,Get,Update,Delete

		public InfraIdcard Get(string id)
		{
			return InfraIdcardRepository.Get(id);
		}

		public InfraIdcard GetByCardUId(string CardUid)
		{
			return InfraIdcardRepository.GetByCardUId(CardUid);
		}

		public InfraIdcard Load(string id)
		{
			return InfraIdcardRepository.Load(id);
		}

		public void SaveOrUpdate(InfraIdcard entity)
		{
			this.InfraIdcardRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			InfraIdcardRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			InfraIdcardRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return InfraIdcardRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return InfraIdcardRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<InfraIdcard> GetAll()
		{
			return InfraIdcardRepository.GetAll();
		}

		public IList<InfraIdcard> GetPlist(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
			return InfraIdcardRepository.GetPlist(query, start, limit, sort, dir, filters, out total);
        }
		
		#endregion
	}
}
